from selenium import webdriver
import time

# TODO Chrome浏览器配置

# 准备options
options = webdriver.ChromeOptions()
user_data_dir = r'--user_data_dir=C:\Users\57836\AppData\Local\Google\Chrome\User Data\Default'  # chrome://version/路径地址
options.add_argument(user_data_dir)

# 打开浏览器(设置options),请求访问网址
driver = webdriver.Chrome(options=options)
driver.get('https://www.baidu.com')
driver.maximize_window()

# 退出浏览器
time.sleep(3)
driver.quit()


